import request from '@/utils/myrequest'

// 初始化列表
export function getList(kvs) {
  return request({
    url: '/mtms/MaterialEquipment/GetList',
    method: 'get',
    kvs
  })
}

export function getInfo(kvs) {
  return request({
    url: '/mtms/MaterialEquipment/GetMaterialEquipmentById',
    method: 'get',
    kvs
  })
}

export function doAdd(kvs) {
  return request({
    url: '/mtms/MaterialEquipment/Add',
    method: 'POST',
    kvs
  })
}

export function doUpdate(kvs) {
  return request({
    url: '/mtms/MaterialEquipment/Update',
    method: 'POST',
    kvs
  })
}

export function doDelete(kvs) {
  return request({
    url: '/mtms/MaterialEquipment/Delete',
    method: 'POST',
    kvs
  })
}
// 材料类型
export function getAllTypes(kvs) {
  return request({
    url: '/mtms/MaterialType/GetAllType',
    method: 'get',
    kvs
  })
}

// 材料编号
export function getAllMaterialCode(kvs) {
  return request({
    url: '/mtms/MaterialInfo/GetAllMaterialCode',
    method: 'get',
    kvs
  })
}

// 根据材料的Code获取材料适用的机台的类型下的所有机台的ID
export function eqpIdNameListByMatCode(kvs) {
  return request({
    url: '/mtms/MaterialEquipment/GetEqpIDAndTypeByMaterialCode',
    method: 'get',
    kvs
  })
}
